package com.open.capacity.notice.service;

import javax.validation.Valid;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.open.capacity.common.dto.ResponseEntity;
import com.open.capacity.common.validator.UpdateGroup;
import com.open.capacity.notice.dmo.MessageTemplate;
import com.open.capacity.notice.dto.MessageTemplateDto;

/**
 * <p>
 *  服务类
 * </p>
 * @since 2024-05-06
 */
public interface MessageTemplateService extends IService<MessageTemplate> {
	/**
	 * 分页列表查询
	 *
	 * @param messageTemplate
	 * @param page
	 * @return
	 */
	public ResponseEntity queryPageList(MessageTemplate messageTemplate, Page page) ;

	/**
	 * 添加
	 *
	 * @param messageTemplateDto
	 * @return
	 */
	public ResponseEntity<MessageTemplate> add(@Valid @RequestBody MessageTemplateDto messageTemplateDto) ;

	/**
	 * 编辑
	 *
	 * @param messageTemplateDto
	 * @return
	 */
	public ResponseEntity<Boolean> edit(@Validated({ UpdateGroup.class }) @RequestBody MessageTemplateDto messageTemplateDto);
	/**
	 * 通过id查询
	 *
	 * @param id
	 * @return
	 */
	public ResponseEntity queryById(@RequestParam(name = "id") String id) ;

	/**
	 * 通过id删除
	 *
	 * @param id
	 * @return
	 */
	public ResponseEntity<Boolean> delete(@RequestParam(name = "id") String id) ;
}
